#include <WinSock2.h>
#include <Ws2tcpip.h>
#pragma comment(lib, "Ws2_32.lib")

int main(int argc, char*argv[])
{
    WSACleanup();
    namelen = sizeof(sockaddr_in);
    connect(ClientSocket, (sockaddr*)& ServerAddr, namelen);
    int namelen;
    int buffsize;
    char ipaddr[16] = { "127.0.0.1" };
    int ipport=12345;
    wVersionRequested =MAKEWORD(2, 2);
    WSAData lpWSAData;
    int RetValue;
    SOCKET ClientSocket;
    WSAStartup(wVersionRequested, &lpWSAData);
    buffsize = sizeof(buffer);
    ServerAddr.sin_port = htons(ipport);
    char buffer[100] = {"helloworld"};
    WORD wVersionRequested;
    ClientSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
    closesocket(ClientSocket);
    ServerAddr.sin_family = AF_INET;
    ServerAddr.sin_family = AF_INET;
    WSABUF wsabuf = { 0 };
    sockaddr_in ServerAddr;
    
    Sleep(500);
    send(ClientSocket, buffer, buffsize, 0);
    
    return 0;
}